<?php

/* == ASCII == */

define ('kASCII', 'US-ASCII');
// IANA list of aliases for ASCII
global $_CASCIIStringEncodingNames;
$_CASCIIStringEncodingNames = array(
	'US-ASCII',
	'ANSI_X3.4-1968',
	'ANSI_X3.4-1986',
	'ASCII',
	'ASCII-8',
	'ASCII-7',
	'us',
	'ISO646-US',
	'ISO_646.irv:1991',
	'iso-ir-6',
	'IBM367',
	'cp367',
	'csASCII'
);

CEncodingAdd($_CASCIIStringEncodingNames,
	'CASCIIString', 'CASCIIEncoder');

function CStr($x) {
	return CASCIIString::MakeNewFromBuffer($x, true);
}


/* == ISO Latin 1 == */

define ('kISOLatin1', 'ISO-8859-1');
// IANA list of aliases for ISO-8895-1
global $_CISO_8859_1StringEncodingNames;
$_CISO_8859_1StringEncodingNames = array(
	'ISO_8859-1:1987',
	'iso-ir-100',
	'ISO_8859-1',
	'ISO-8859-1',
	'latin1',
	'l1',
	'IBM819',
	'CP819',
	'csISOLatin1'
);

CEncodingAdd($_CISO_8859_1StringEncodingNames,
	'CISO_8859_1String', 'CISO_8859_1Encoder');

function CStrISO($x) {
	return CISO_8859_1String::MakeNewFromBuffer($x);
}


/* == UTF-8 == */

define ('kUTF8', "UTF-8");
global $_CUTF8StringEncodingNames;
$_CUTF8StringEncodingNames = array(
	'UTF-8',
	'UTF8',
	'UTF_8'
);

CEncodingAdd($_CUTF8StringEncodingNames,
	'CUTF_8String', 'CUTF_8Encoder');
function CStrUTF8($x) {
	return CUTF_8String::MakeNewFromBuffer($x);
}


/* == UCS-2LE == */

define ('kUCS2LE', 'UCS2-LE');
global $_CUCS2StringEncodingNames;
$_CUCS2StringEncodingNames = array(
	'UCS2-LE',
	'UCS2_LE',
	'UCS2LE'
);

CEncodingAdd($_CUCS2StringEncodingNames,
	'CUCS2String', 'CUCS2Encoder');


/* == Windows-1252 == */

define ('kWindows1252', 'windows-1252');

CEncodingAdd( array( kWindows1252 ),
'CWindows1252String', 'CWindows1252Encoder');

?>